﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 花店管理系统.Order;

namespace 花店管理系统.geren
{
    public partial class Shouye : Form
    {
        public Shouye()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            geren.gonggao gonggao = new geren.gonggao();
            gonggao.Show();
        }

        private void btnShopping_Click(object sender, EventArgs e)
        {
            //ShopCart sl = new ShopCart();
            //sl.ShowDialog();

        }

        private void btnOrder_Click(object sender, EventArgs e)
        {
            Order_info orl = new Order_info();
            orl.ShowDialog();
        }

        private void Shouye_Load(object sender, EventArgs e)
        {
            lbName.Text = Login.username;
            string imagePath = Login.GetUserImagePath(Login.username);

            if (!string.IsNullOrEmpty(imagePath) && File.Exists(imagePath))
            {
                pictureBox1.ImageLocation = imagePath; // 假设pictureBoxUser是用于显示用户图片的PictureBox控件
            }
            else
            {
                MessageBox.Show("用户图片不存在或路径无效。");
                // 可能需要设定默认图片或者做其他处理
            }

        }

        private void btnKefu_Click(object sender, EventArgs e)
        {
            Customer_Services.Client client = new Customer_Services.Client();
            client.Show();
        }

        private void btnSonhua_Click(object sender, EventArgs e)
        {
            geren.Sonlitishi sl = new geren.Sonlitishi();
            sl.ShowDialog();
        }

        private void btnCanle_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            geren.Cakanpinglun ck = new geren.Cakanpinglun();
            ck.ShowDialog();
        }
    }
}
